﻿using System;
using UnityEngine;
using ZYLFramework.Manage;

namespace Game
{
    /// <summary>
    /// 操作状态
    /// </summary>
    public enum ControlStatus
    {
        /// <summary>
        /// 选择棋子
        /// </summary>
        SelectPawn,
        /// <summary>
        /// 面板操作
        /// </summary>
        Operate,
        /// <summary>
        /// 移动操作
        /// </summary>
        Move,
        /// <summary>
        /// 攻击选择操作
        /// </summary>
        Attack,
        /// <summary>
        /// 攻击面板操作
        /// </summary>
        AttackOperate,
    }
    
    /// <summary>
    /// 游戏状态
    /// </summary>
    public enum GameStatus
    {
        /// <summary>
        /// 开始回合
        /// </summary>
        StartRound,
        /// <summary>
        /// 选择角色
        /// </summary>
        SelectPawn,
        /// <summary>
        /// 角色移动
        /// </summary>
        PawnMove,
        /// <summary>
        /// 对战状态
        /// </summary>
        Attack,
        /// <summary>
        /// 回合结束
        /// </summary>
        EndRound,
    }
    
    /// <summary>
    /// 操作指令
    /// </summary>
    public enum ControlCommand
    {
        Null,
        Up,
        Down,
        Left,
        Right,
        Submit,
        Cancel,
    }

    public enum GameState
    {

    }

        public enum CameraState
    {
        /// <summary>
        /// 正交
        /// </summary> 
        Orthographic,
        /// <summary>
        /// 透视 
        /// </summary> 
        Perspective,
    }

    public delegate void OnCollisionEnterHandler(Collision collision);
    public delegate void FuncDelegate();
    
    public class Commoncs
    {
    }
    
    public class UICommoncs
    {
        public static GameObject UIAddChild(string path,GameObject panel)
        {
            var go = ResourcesManage.Instance.NewObjectAsset(path) as GameObject;
            if (go != null)
            {
                go.transform.SetParent(panel.transform, false);
                return go;
            }
            return null;
        }
    }

}